<template>
    <!-- Form -->
    <el-button text @click="dialogFormVisible = true" style="color:cadetblue">
        忘记密码？
    </el-button>
  
    <el-dialog v-model="dialogFormVisible" title="忘记密码">
  
 <div>
    <el-form :model="form">
  
  <el-form-item label="邮箱账号" :label-width="formLabelWidth">
    <el-input v-model="form.account" autocomplete="off" placeholder="请输入邮箱账号" />
  </el-form-item>

  <el-form-item label="邮箱密码" :label-width="formLabelWidth" >
    <el-input v-model="form.password" placeholder="请输入邮箱密码" show-password/>
  </el-form-item>
  <div class="an">
  <el-form-item label="验证码" :label-width="formLabelWidth">
    <el-input v-model="input2" placeholder="请输入验证码">
        
  <template #append><el-button  :plain="true" @click="open2">获取</el-button></template>

   </el-input>
   
  </el-form-item>
  </div>
    
  
</el-form>
 </div>
      <template #footer>
        <span class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取消</el-button>
        <el-button type="primary" @click="doLogin">确定</el-button>
        </span>
      </template>
    </el-dialog>
  </template>
  
  <script lang="ts" setup>
  //将全局对象的axios提取出来，通过inject
  import { reactive, ref,inject} from 'vue'
  import { ElMessage } from 'element-plus'
  
  //导入路由
  import {useRoute,useRouter} from 'vue-router'
  import {
  Check,
  Delete,
  Edit,
  Message,
  Search,
  Star,
  
} from '@element-plus/icons-vue'
  const input2 = ref('')
  const dialogFormVisible = ref(false) //基本数据类型
  const doLogin = ref(false)
  const formLabelWidth = '140px'
  
  
  const  form = reactive({
    account: '',
    password: '',
    check:''

  })
  const open2 = () => {
  ElMessage({
    message: '发送成功',
    type: 'success',
  })
}
  </script>
  
  <style scoped>
  .el-button--text {
    margin-right: 25px;
  }
  .el-select {
    width: 300px;
  }
  .el-input {
    width: 300px;
  }
  .dialog-footer button:first-child {
    margin-right: 10px;
  }
 :deep(.el-form-item){
  margin-top:30px ;
 }
 :deep(.el-dialog__body){
  padding: 10px;
  margin-left: 0px;
 }
  </style>
  